﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace DCT.View
{
    [ValueConversion(typeof(string), typeof(string))]
    public class FileNameToTileConverter : IValueConverter
    {
        public object Convert(object value, Type typeTarget, object param, CultureInfo culture)
        {
            if (typeTarget == typeof(string) && value is string)
            {
                return System.IO.Path.GetFileNameWithoutExtension(value as string) + @" - Insigma DCT";
            }

            return "Insigma DCT";
        }
        public object ConvertBack(object value, Type typeTarget, object param, CultureInfo culture)
        {
            return null;
        }
    }
}
